<script>
    var UNIQUEIDENTIFIER = '<?php echo $this->UNIQUEIDENTIFIER; ?>';
</script>
<link rel="stylesheet" href="<?php echo $this->CSS_PATH ?>main.css">
<?php $this->headScript()->appendFile($this->JS_PATH . 'form_quote.js'); ?>


<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
<div id="quotes-listing"></div>
<div class="clearfix"></div>
<div class="content">
    <div class="page-title"> <i class="icon-custom-right"></i>
        <h3><span class="semi-bold"><?php echo $this->mode; ?> Quote</span></h3>
    </div>
	<div class="row">
        <div class="col-md-12">
            <div class="grid simple">
                <div class="grid-title"></div>
				<div class="grid-body ">
					<div class="row">
						<?php echo $this->flashmessages(); ?>
						<?php if (count($this->errorMessageArray) > 0): ?>
							<div class="alert alert-error">
								<?php foreach ($this->errorMessageArray as $erroValue): ?>
									<div class="text-left">
										<i class="icon-remove-sign"></i>
										<?php echo $erroValue; ?>
									</div>
								<?php endforeach; ?>
							</div>
						<?php endif; ?>

						<form id="commentForm" action="" method="POST" enctype="multipart/form-data">
							<div id="rootwizard" class="col-md-12">
								<div class="form-wizard-steps">
									<ul class="wizard-steps">
										<li class="other_tab active" data-target="#step1"> <a href="#tab1" data-toggle="tab"> <span class="step">1</span> <span class="title">Quote Information</span> </a> </li>
										<li data-target="#step2" class="other_tab tab2_cls"> <a href="#tab2" data-toggle="tab"> <span class="step">2</span> <span class="title">Client Informnation</span> </a> </li>
										<li data-target="#step3" class="tab3_cls"> <a href="#tab3" data-toggle="tab"> <span class="step">3</span> <span class="title">New Section</span> </a> </li>
										<!--<li data-target="#step4" class="other_tab tab4_cls"> <a href="#tab4" data-toggle="tab"> <span class="step">4</span> <span class="title">Note<br></span> </a> </li>-->
									</ul>
									<div class="clearfix"></div>
								</div>
								<div class="tab-content transparent ">
									<div class="tab-pane active" id="tab1"> <br>
										<h4 class="semi-bold">Step 1 - <span class="light">Quote Information</span></h4>
										<br>
										
										<input type="hidden" name="UNIQUEIDENTIFIER" value="<?php echo $this->UNIQUEIDENTIFIER; ?>" />
											
											<div class="row form-row">
												<div class="col-md-6">
													<label class="form-label">Subject 
														<span class="span_required">*</span>
													</label>
													<?php echo $this->form->quote_subject; ?>
												</div>
												<div class="col-md-3">
													<label class="form-label">Deal</label>
													<?php echo $this->form->quote_deal_id; ?>
												</div>
											</div>
											
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Quote Status 
														<span class="span_required">*</span>
													</label>
													<?php echo $this->form->quote_main_status; ?>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">Quote Currency 
														<span class="span_required">*</span>
													</label>
													<?php echo $this->form->quote_currency; ?>
												</div>
												
												<div class="col-md-3">
													<label class="form-label">Quote Amount</label>
													<?php echo $this->form->quote_amount; ?>
												</div>
											</div>
										
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Start Date</label>
													<div class="input-append success date ">
														<?php echo $this->form->quote_startdate; ?>
														<span class="add-on"><span class="arrow"></span><i class="fa fa-th"></i></span>
													</div>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">End Date</label>
													<div class="input-append success date ">
														<?php echo $this->form->quote_enddate; ?>
														<span class="add-on"><span class="arrow"></span><i class="fa fa-th"></i></span>
													</div>
												</div>
												
												<label class="form-label">&nbsp;</label>
												<?php 
													$checked = "";
													if ($this->quote_available_to_everyone == 1) {
													  $checked = "checked";
													} 
												?>
												<label>
													<input type="checkbox" name="quote_available_to_everyone" <?php echo $checked;?> value="1">&nbsp; Client available to everyone
												</label>
											</div>
										<br/>
									</div>
									
									<br/>
									<div class="tab-pane" id="tab2"> <br>
									
										<h4 class="semi-bold">Step 2 - <span class="light">Client Information</span></h4>
										<br/>
											<div class="row form-row">
												<div class="col-md-5">
													<div class="col-md-5">
														<label class="form-label">Client</label>
														<?php echo $this->form->quote_clnt_id; ?>
													</div>
													<div class="">
														<label class="form-label">&nbsp;</label>
														<button id="add_client" class="btn btn-success" data-toggle="modal"> Add Client </button>
													</div>
												</div>
											
												<div class="col-md-5">
													<div class="col-md-5">
														<label class="form-label">Company</label>
														<?php echo $this->form->quote_com_id; ?>
													</div>
													<div class="">
														<label class="form-label">&nbsp;</label>
														<button id="add_company" class="btn btn-success" data-toggle="modal"> Add Company </button>
													</div>
												</div>
												
												<div class="col-md-5">
													<label class="form-label">Client Name</label>
													<?php echo $this->form->quote_client; ?>
												</div>
											</div>
												
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Address1</label>
													<?php echo $this->form->quote_adrline1; ?>
												</div>
												
												<div class="col-md-3">
													<label class="form-label">Address2</label>
													<?php echo $this->form->quote_adrline2; ?>
												</div>
												
												<div class="col-md-3">
													<label class="form-label">Address3</label>
													<?php echo $this->form->quote_adrline3; ?>
												</div>
											</div>
											
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Street</label>
													<?php echo $this->form->quote_street; ?>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">Postal</label>
													<?php echo $this->form->quote_postal; ?>
												</div>
												
												<div class="col-md-3">
													<label class="form-label">City</label>
													<?php echo $this->form->quote_city; ?>
												</div>
											</div>
											
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Country</label>
													<?php echo $this->form->quote_country; ?>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">Email
														<span class="span_required">*</span>
													</label>
													<?php echo $this->form->quote_email; ?>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">Phone No.
														<span class="span_required">*</span>
													</label>
													<?php echo $this->form->quote_phone; ?>
												</div>
											</div>
											
											<div class="row form-row extraimagecontainer">
											 <h4>Gallery</h4>
												<div class="col-md-10">
													<div class="dropzone qf_gallery">
													</div>
												</div>
											</div>
											
										<br/>
									</div>
									
									<br/>
									<div class="tab-pane" id="tab3"> <br>
										<h4 class="semi-bold">Step 3 - <span class="light">New Section</span></h4>
										<br>
											<div class="row form-row">
												<div class="col-md-3">
													<label class="form-label">Content</label>
													<?php echo $this->form->quote_content; ?>
												</div>
											
												<div class="col-md-3">
													<label class="form-label">Condition</label>
													<?php echo $this->form->quote_condition; ?>
												</div>
												
												<div class="col-md-3">
													<label class="form-label">status</label>
													<?php echo $this->form->quote_status; ?>
												</div>
											</div>
										<br/>
									</div>
									
									<!--<div class="tab-pane" id="tab4"> <br>
                                        <h4 class="semi-bold">Step 4 - <span class="light">Note</span></h4>
                                        <br>
									</div>-->
									
									<ul class=" wizard wizard-actions">
										<li class="previous first" style="display:none;"><a href="javascript:;" class="btn">&nbsp;&nbsp;First&nbsp;&nbsp;</a></li>
										<li class="previous"><a href="javascript:;" class="btn">&nbsp;&nbsp;Previous&nbsp;&nbsp;</a></li>
										<li class="next last disabled" style="display:none;"><a href="javascript:;" class="btn btn-primary">&nbsp;&nbsp;Last&nbsp;&nbsp;</a></li>
										<li class="next disabled lastbutton"><a href="javascript:;" class="btn btn-primary">&nbsp;&nbsp;Next&nbsp;&nbsp;</a></li>
										
										
										<?php if ($this->mode == 'Edit'): ?>
											<input type="submit" value="Update" class="submitfrmbtn btn btn-primary" name="Update"/>
										<?php else: ?>
											<input type="submit" value="Submit" class="submitfrmbtn   btn btn-primary" name="Submit"/>
										<?php endif; ?>
											<a href="<?php echo $this->url(array('module' => 'admin', 'controller' => 'client', 'action' => 'form'), null, TRUE); ?>" class="btn btn-default"/>
												Cancel
											</a>
				
										<!--
										<?php if ($this->mode == 'Edit'): ?>
											<input type="submit" value="Save Changes" class="submitfrmbtn display-none btn btn-primary" name="Edit property"/>
										<?php else: ?>
											<input type="submit" value="Add property" class="submitfrmbtn display-none btn btn-primary" name="Add property"/>
										<?php endif; ?>
										
										<input type="submit" value="Add property" class="tab3_btn display-none btn btn-primary" name="Add property"/>
										<a class="btn btn-success" href="<?php echo $this->url(array('controller' => 'property', 'action' => 'list'), null, TRUE); ?>">Cancel</a>
										-->
									</ul>
								</div>
							</div>
						</form>
					</div>
				</div>   
			</div>
		</div>    
	</div>
</div>
<!-- END PAGE -->


<!-- Assign to company modal -->
<div class="modal fade" id="myModal_company" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 id="myModalLabel" class="semi-bold">Add Company</h4>
            </div>
            <div class="modal-body">
                <div class="row form-row">
                    <div class="alert alert-error" id="error_add_client" style="display: none">
                        Please select client.
                    </div>
                    <div class="alert alert-success" id="success_add_client" style="display: none">
                        Client add successfully.
                    </div>
				
					<div class="col-md-10">
						<div class="col-md-2">Name </div>
						<div class="col-md-8">
							<input type="text" name="comp_name" id="comp_name" style="width: 300px;"/>
						</div>
					</div>
				
					<div class="col-md-10">
						<div class="col-md-2">Type </div> 
						<div class="col-md-8">
							<select style="width: 300px;" class=" " name="comp_type" id="comp_type">
								<?php foreach ($this->companytypeArray as $key => $value): ?>
									<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
								<?php endforeach; ?>
							</select>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-2">Industry </div>
						<div class="col-md-8">
							<select style="width: 300px;" class=" " name="comp_industry" id="comp_industry">
								<?php foreach ($this->companyindustryArray as $key => $value): ?>
									<option value="<?php echo $key; ?>"><?php echo $value; ?></option>
								<?php endforeach; ?>
							</select>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-2">Email </div> 
						<div class="col-md-8">
							<input type="text" name="comp_email" id="comp_email" style="width: 300px;"/>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-2">Phone </div> 
						<div class="col-md-8">
							<input type="text" name="comp_phone" id="comp_phone" style="width: 300px;"/>
						</div>
					</div>
				
					<div class="col-md-10">
						<div class="col-md-2">Address </div> 
						<div class="col-md-8">
							<textarea rows="3" cols="43" name="comp_adrline1" id="comp_adrline1"></textarea>
						</div>
					</div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="add_btn_company">Save</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->


<!-- Assign to company modal -->
<div class="modal fade" id="myModal_client" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 id="myModalLabel" class="semi-bold">Add Client</h4>
            </div>
            <div class="modal-body">
                <div class="row form-row">
                    <div class="alert alert-error" id="error_add_client" style="display: none">
                        Please select client.
                    </div>
                    <div class="alert alert-success" id="success_add_client" style="display: none">
                        Client add successfully.
                    </div>
				
					<div class="col-md-10">
						<div class="col-md-3">First Name</div>
						<div class="col-md-8">
							<input type="text" name="clnt_first_name" id="clnt_first_name" style="width: 300px;"/>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-3">Middle Name</div>
						<div class="col-md-8">
							<input type="text" name="clnt_middle_name" id="clnt_middle_name" style="width: 300px;"/>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-3">Last Name</div>
						<div class="col-md-8">
							<input type="text" name="clnt_last_name" id="clnt_last_name" style="width: 300px;"/>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-3">Email</div>
						<div class="col-md-8">
							<input type="text" name="clnt_email" id="clnt_email" style="width: 300px;"/>
						</div>
					</div>
					
					<div class="col-md-10">
						<div class="col-md-3">Phone</div>
						<div class="col-md-8">
							<input type="text" name="clnt_phone" id="clnt_phone" style="width: 300px;"/>
						</div>
					</div>
				</div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="add_btn_client">Save</button>
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->